-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IfW: add VTK output of slice in XY to driver #1643
IfW: add VTK output of slice in XY to driver #1643
Conversation
This allows visualizing a slice through hub-height (or other height) when compairing with a simulation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a cool feature. Saw a couple of things that should probably be fixed.
character(*), intent(in) :: FileRootName !< RootName for output files | ||
real(ReKi), intent(in) :: XYslice_height | ||
integer(IntKi), intent(in) :: unit !< Error status of the operation | ||
integer(IntKi), intent(out) :: ErrStat !< Error status of the operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are ErrStat
and ErrMsg
initialized in this function? Maybe I missed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't explicitly initialized, but get set either by OpenFOutFile
or by the check on the slice height. For completeness I can add them.
I also just noticed that there is no upper bounds check on the height, which could lead to an invalid index on iz
. I'll fix that also.
If it's not too much work, maybe XZ and YZ could be added too (like fast farm). On a side note, plotting slices of TurbSim and Mann boxes can easily be done using the python-toolbox: |
Adding the XY and YZ slices should be pretty straightforward. I'll give that a shot. Also, it might make sense to allow exporting multiple slices instead of just one. |
efa2dc6
to
82eec99
Compare
For generating InflowWind_Driver_Types.f90
da194da
to
cecb3e1
Compare
This PR is ready to merge.
Feature or improvement description
This allows visualizing a slice through hub-height (or other height) when comparing with a simulation. The user can specify the height at which to export the slice. At the moment it is a very slow process due to the looping and because it exports over the entire time range (this could be improved later).
This figure shows the XY plane at the hub height for a Mann wind field (HAWC format). The vertical plane is exported from the driver using the
WrVTK
option. Both are taken at 23.625 seconds.Related issue, if one exists
none
Impacted areas of the software
InflowWind driver only
Additional supporting information
During testing of the wake added turbulence feature, I ran into issues in verifying that the background turbulence was being added correctly. To check this, I needed some way to visualize the XY plane through the hub from the Mann box turbulence.
Test results, if applicable
No test cases are affected. I did not add a test case for this since it is a very slow code to execute.